package com.itheima.Thread.Thread类;

public class Test34 {

 public static void main(String[] args) {
     //1.基于thread类方式实现多线程
     MyThread2 t1 = new MyThread2();
     //设置线程优先级
 //    t1.setPriority(90);
     t1.setName("嗷");
     //设置守护线程
     t1.setDaemon(true);
     t1.start();

     //2.基于实现Rannable接口方式实现多线程
     MyRunnable mr  = new MyRunnable();
     Thread t2 = new Thread(mr,"嗷呜");
  //   t1.setPriority(20);
     t2.start();

     //基于Lambda表达式方式快速实现多线程
     new Thread(()->{
         for (int i = 0; i < 30; i++) {
             System.out.println("呜哇");
         }
     },"咔哇").start();



 }
}
